Program Transformation for Program Verification

نویسندگان

  • Alberto Pettorossi
  • Maurizio Proietti
چکیده

We present a transformational approach to program verification and software model checking that uses three main ingredients: (i) Constraint Logic Programming (CLP), (ii) metaprogramming and program specialization, and (iii) proof by transformation. (i) Constraints are used for representing in a compact way (finite or infinite) sets of values or memory states, and logic is used for expressing properties of program executions [2, 4, 5]. The least fixpoint semantics and negation allow us to denote both the least models and the greatest models of programs, and thus to reason about the (finite or infinite) behaviour of programs. (ii) Metaprogramming is used for getting a verification technique which is parametric with respect to the programming language in use. In particular, we introduce a CLP program I which defines the (meta)interpreter of the programming language in which the program P to be verified is written. Then, in order to gain efficiency, we remove this interpretation layer by specializing the interpreter I with respect to the given program P [1, 6, 7]. The property φ that should be proved (or disproved) about program P , is expressed through the CLP clauses that characterize the set of states in which φ holds (or does not hold, respectively). (iii) Having derived a CLP program P̃ whose semantics represents the behaviour of the given program P and the property φ to be verified, we start a third phase which consists in the proof by CLP program transformation. This transformation is performed by using unfold/fold rules and also some generalization and goal replacement rules which all preserve the semantics [8]. By the generalization rule [3] one can derive the invariants which hold during program execution and are needed to verify the given property. Rules are applied according to some strategies with the objective of deriving from program P̃ a new CLP program P̃1 so that a selected atom, say prop, either belongs to P̃1 (in which case φ holds) or no clause for prop belongs to P̃1 (in which case φ does not hold). We have designed a few (semi)automatic strategies which make the transformation process to terminate. Obviously, they are all incomplete due to undecidability limitations, but they work well on many non-trivial examples.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Finite Countermodel Based Verification for Program Transformation (A Case Study)

Both automatic program verification and program transformation are based on program analysis. In the past decade a number of approaches using various automatic general-purpose program transformation techniques (partial deduction, specialization, supercompilation) for verification of unreachability properties of computing systems were introduced and demonstrated [10, 19, 30, 36]. On the other ha...

متن کامل

Software Verification for Weak Memory via Program Transformation

Multiprocessors implement weak memory models, but program verifiers often assume Sequential Consistency (SC), and thus may miss bugs due to weak memory. We propose a sound transformation of the program to verify, enabling SC tools to perform verification w.r.t. weak memory. We present experiments for a broad variety of models (from x86-TSO to Power) and a vast range of verification tools, quant...

متن کامل

Verification of Imperative Programs by Constraint Logic Program Transformation

We present a method for verifying partial correctness properties of imperative programs that manipulate integers and arrays by using techniques based on the transformation of constraint logic programs (CLP). We use CLP as a metalanguage for representing imperative programs, their executions, and their properties. First, we encode the correctness of an imperative program, say prog, as the negati...

متن کامل

Cryptographic Protocol Verification via Supercompilation

It has been known for a while [35, 36, 12] that program transformation techniques, in particular, program specialization, can be used to prove the properties of programs automatically. For example, if a program actually implements (in a given context of use) a constant function sufficiently powerful and semantics preserving program transformation may reduce the program to a syntactically trivia...

متن کامل

Verification of Multi-Party Ping-Pong Protocols via Program Transformation

The paper describes a verification technique based on program transformation with unfolding. The technique allows to find short attacks on multi-party ping-pong protocols in the Dolev–Yao intruder model. Protocols are modelled by prefix grammars, and questions of model optimization and complexity are considered. Examples of model programs for protocols were written in a functional language and ...

متن کامل

Verifying Programs via Intermediate Interpretation

We explore an approach to verification of programs via program transformation applied to an interpreter of a programming language. A specialization technique known as Turchin’s supercompilation is used to specialize some interpreters with respect to the program models. We show that several safety properties of functional programs modeling a class of cache coherence protocols can be proved by a ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013